#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    int count = 1;
    while(n/2>=1)
    {
        if(n%2==1)
        {
            count++;
        }
        n=n/2;
    }
    cout<<count;
}